﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
namespace CMN.Entity
{
      ///<summary>
    ///Normal_NoticeEntity实体类(通知公告)
    ///</summary>
    [Serializable]
    public partial class Normal_NoticeEntity : ISerializable 
    {
        #region "Private Variables"
        private DataTableAction _DataTable_Action;  // 操作方法 Insert:增加 Update:修改 Delete:删除
        private Int32 _Id=0; // 公告递增Id
        private String _Title=""; // 标题
        private String _TextContent=""; // 内容
        private DateTime? _AddDate=DateTime.Now; // 添加时间
        private Byte _Enabled=0; // 状态
        private DateTime? _StartDate=DateTime.Now; // 开始时间
        private DateTime? _EndDate=DateTime.Now; // 结束时间
        private Int32 _UserId=0; // 添加用户
        private Int32 _TemplateId=0; // 模板Id
        private string _Url = "";
          public Normal_NoticeEntity()
        {

        }
          public Normal_NoticeEntity(SerializationInfo info, StreamingContext content)
        {

            Id = info.GetInt32("Id");
            Enabled = info.GetByte("Enabled");
            AddDate = info.GetDateTime("AddDate");
            _StartDate = info.GetDateTime("StartDate");
            _EndDate = info.GetDateTime("EndDate");
            Title = info.GetString("Title");
            TextContent = info.GetString("TextContent");
            TemplateId = info.GetInt32("TemplateId");
        }


        public virtual void GetObjectData(SerializationInfo info, StreamingContext content)
        {

            info.AddValue("Id", Id);
            info.AddValue("Enabled",Enabled);
            info.AddValue("AddDate", AddDate);
            info.AddValue("StartDate",StartDate);
            info.AddValue("EndDate", EndDate);
            info.AddValue("Title", Title);
            info.AddValue("TextContent", TextContent);
            info.AddValue("TemplateId", TemplateId);
           
        }
        #endregion

        #region "Public Variables"
        ///<summary>
        /// 操作方法 Insert:增加 Update:修改 Delete:删除
        ///</summary>
        public DataTableAction DataTable_Action
        {
            set { this._DataTable_Action = value; }
            get { return this._DataTable_Action; }
        }
        /// <summary>
        /// 公告递增Id
        /// </summary>
        public Int32  Id
        {
            set { this._Id = value; }
            get { return this._Id; }
        }
        /// <summary>
        /// 标题
        /// </summary>
        public String  Title
        {
            set { this._Title = value; }
            get { return this._Title; }
        }
        /// <summary>
        /// 内容
        /// </summary>
        public String  TextContent
        {
            set { this._TextContent = value; }
            get { return this._TextContent; }
        }
        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime?  AddDate
        {
            set { this._AddDate = value; }
            get { return this._AddDate; }
        }
        /// <summary>
        /// 状态
        /// </summary>
        public Byte  Enabled
        {
            set { this._Enabled = value; }
            get { return this._Enabled; }
        }
        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime?  StartDate
        {
            set { this._StartDate = value; }
            get { return this._StartDate; }
        }
        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime?  EndDate
        {
            set { this._EndDate = value; }
            get { return this._EndDate; }
        }
        /// <summary>
        /// 地址
        /// </summary>
        public string Url {
            set { _Url = value; }
            get { return _Url; }
        }
        /// <summary>
        /// 添加用户
        /// </summary>
        public Int32  UserId
        {
            set { this._UserId = value; }
            get { return this._UserId; }
        }
        /// <summary>
        /// 模板Id
        /// </summary>
        public Int32  TemplateId
        {
            set { this._TemplateId = value; }
            get { return this._TemplateId; }
        }
        #endregion
    }
}
